
function includes(object,ch){
  for(let valueItem in object){
    for(let item of object[valueItem])
      if(item === ch){
        return true;
      }
  }
  return false;
}
function collect_same_elements(collection_a, object_b) {
  let result = [];
  for(let item of collection_a){
    if(includes(object_b,item)){
      result.push(item);
    }
  }
  return result;
}

module.exports = collect_same_elements;
